package com.hs.pre.module.data;


import java.util.Map;

import com.hs.HsBase;
import com.hs.pre.model.GatherEntry;
import com.hs.pre.page.PageParam;
import com.hs.pre.page.PageQuery;
import com.hs.pre.page.PageUtil;
import com.hs.pre.page.ReverseLoadData;


public class GatherDAO {

	 
	/**
	 * 获得分类列表
	 * @param 
	 * @return
	 */
	public PageUtil  getGatherList(PageParam pageParam )
	{ 
		String sql = (String) HsBase.getAnsiSqlMap().get("pre_gather.select");
		try {
			PageQuery a= new PageQuery(sql,null,pageParam,new ReversetData());
			return a.getPageUtil();
		} catch (Exception e) { 
			e.printStackTrace();
		}
		
		return null;
	}
	class ReversetData implements ReverseLoadData
	{

		public Object load(Map map) { 
			return new GatherEntry(map);
		}
		
		
	}
}
